<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>精灵图</title>
    <style>
        /* 精灵图的使用值通常都是负值x轴在前y轴在后（精灵图通常都是用background：url语法 */
        div {
            width: 60px;
            height: 60px;
            background-color: pink;
            margin: 100px auto; 
            background: url(images/sprites.png) no-repeat -182px 0;
        }
        p {
            width: 23px;
            height: 23px;
            background-color: skyblue;
            background: url(images/sprites.png)  no-repeat -157px -106px ;
        }
    </style>
</head>
<body>
    <div></div>
    <p></p>

</body>
</html>